//
//  Peson.m
//  testapp
//
//  Created by Heng Yue on 2020/3/23.
//  Copyright © 2020 Heng Yue. All rights reserved.
//

#import "Peson.h"

@implementation Peson
-(instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    UIButton *btn=[[UIButton alloc] init];
    btn.frame=CGRectMake(0, 0, frame.size.width, 30);
    [self addSubview:btn];
    [btn setTitle:@"btn" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(tap:) forControlEvents:UIControlEventTouchUpInside];
//    [self addGestureRecognizer:tap];
    return self;
}
@end
